<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Canvas Engine - Collision Demo</title>
    <style>
        body {
            margin: 0;
            padding: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background-color: #333;
            font-family: Arial, sans-serif;
        }
        
        #gameCanvas {
            background-color: #f0f0f0;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
        }
        
        .instructions {
            position: fixed;
            top: 20px;
            left: 20px;
            color: #fff;
            background-color: rgba(0, 0, 0, 0.7);
            padding: 15px;
            border-radius: 5px;
            max-width: 300px;
        }
        
        .instructions h2 {
            margin-top: 0;
            color: #4CAF50;
        }
        
        .instructions ul {
            margin: 0;
            padding-left: 20px;
        }
        
        .instructions li {
            margin: 5px 0;
        }
    </style>
</head>
<body>
    <div class="instructions">
        <h2>碰撞系统演示</h2>
        <ul>
            <li>点击并拖动碰撞体来移动它们</li>
            <li>观察碰撞事件在控制台中的输出</li>
            <li>红色矩形：玩家</li>
            <li>绿色圆形：敌人</li>
            <li>蓝色多边形：障碍物</li>
        </ul>
    </div>
    
    <canvas id="gameCanvas" width="800" height="600"></canvas>
    
    <script type="module" src="collision-demo.js"></script>
</body>
</html> 